3.53 \(\int \csc ^2(a+b x) \csc (2 a+2 b x) \, dx\)

Optimal. Leaf size=30 \[ \frac {\log (\tan (a+b x))}{2 b}-\frac {\cot ^2(a+b x)}{4 b} \]

[Out]

-1/4*cot(b*x+a)^2/b+1/2*ln(tan(b*x+a))/b

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {4288, 2620, 14} \[ \frac {\log (\tan (a+b x))}{2 b}-\frac {\cot ^2(a+b x)}{4 b} \]

Antiderivative was successfully verified.

[In]

Int[Csc[a + b*x]^2*Csc[2*a + 2*b*x],x]

[Out]

-Cot[a + b*x]^2/(4*b) + Log[Tan[a + b*x]]/(2*b)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2620

Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(1 + x^2)^((
m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]

Rule 4288

Int[((f_.)*sin[(a_.) + (b_.)*(x_)])^(n_.)*sin[(c_.) + (d_.)*(x_)]^(p_.), x_Symbol] :> Dist[2^p/f^p, Int[Cos[a
+ b*x]^p*(f*Sin[a + b*x])^(n + p), x], x] /; FreeQ[{a, b, c, d, f, n}, x] && EqQ[b*c - a*d, 0] && EqQ[d/b, 2]
&& IntegerQ[p]

Rubi steps

\begin {align*} \int \csc ^2(a+b x) \csc (2 a+2 b x) \, dx &=\frac {1}{2} \int \csc ^3(a+b x) \sec (a+b x) \, dx\\ &=\frac {\operatorname {Subst}\left (\int \frac {1+x^2}{x^3} \, dx,x,\tan (a+b x)\right )}{2 b}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {1}{x^3}+\frac {1}{x}\right ) \, dx,x,\tan (a+b x)\right )}{2 b}\\ &=-\frac {\cot ^2(a+b x)}{4 b}+\frac {\log (\tan (a+b x))}{2 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 34, normalized size = 1.13 \[ -\frac {\csc ^2(a+b x)-2 \log (\sin (a+b x))+2 \log (\cos (a+b x))}{4 b} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[a + b*x]^2*Csc[2*a + 2*b*x],x]

[Out]

-1/4*(Csc[a + b*x]^2 + 2*Log[Cos[a + b*x]] - 2*Log[Sin[a + b*x]])/b

________________________________________________________________________________________

fricas [B]  time = 0.43, size = 65, normalized size = 2.17 \[ -\frac {{\left (\cos \left (b x + a\right )^{2} - 1\right )} \log \left (\cos \left (b x + a\right )^{2}\right ) - {\left (\cos \left (b x + a\right )^{2} - 1\right )} \log \left (-\frac {1}{4} \, \cos \left (b x + a\right )^{2} + \frac {1}{4}\right ) - 1}{4 \, {\left (b \cos \left (b x + a\right )^{2} - b\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(b*x+a)^2*csc(2*b*x+2*a),x, algorithm="fricas")

[Out]

-1/4*((cos(b*x + a)^2 - 1)*log(cos(b*x + a)^2) - (cos(b*x + a)^2 - 1)*log(-1/4*cos(b*x + a)^2 + 1/4) - 1)/(b*c
os(b*x + a)^2 - b)

________________________________________________________________________________________

giac [B]  time = 1.01, size = 813, normalized size = 27.10 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(b*x+a)^2*csc(2*b*x+2*a),x, algorithm="giac")

[Out]

-1/4*((3*tan(b*x + 4*a)^2*tan(1/2*a)^24 - 180*tan(b*x + 4*a)^2*tan(1/2*a)^22 + 24*tan(b*x + 4*a)*tan(1/2*a)^23
 + tan(1/2*a)^24 + 4230*tan(b*x + 4*a)^2*tan(1/2*a)^20 - 1592*tan(b*x + 4*a)*tan(1/2*a)^21 + 48*tan(1/2*a)^22
- 48612*tan(b*x + 4*a)^2*tan(1/2*a)^18 + 31704*tan(b*x + 4*a)*tan(1/2*a)^19 - 3846*tan(1/2*a)^20 + 277965*tan(
b*x + 4*a)^2*tan(1/2*a)^16 - 259128*tan(b*x + 4*a)*tan(1/2*a)^17 + 51632*tan(1/2*a)^18 - 737640*tan(b*x + 4*a)
^2*tan(1/2*a)^14 + 982192*tan(b*x + 4*a)*tan(1/2*a)^15 - 274545*tan(1/2*a)^16 + 1008468*tan(b*x + 4*a)^2*tan(1
/2*a)^12 - 1871088*tan(b*x + 4*a)*tan(1/2*a)^13 + 733728*tan(1/2*a)^14 - 737640*tan(b*x + 4*a)^2*tan(1/2*a)^10
 + 1871088*tan(b*x + 4*a)*tan(1/2*a)^11 - 1018132*tan(1/2*a)^12 + 277965*tan(b*x + 4*a)^2*tan(1/2*a)^8 - 98219
2*tan(b*x + 4*a)*tan(1/2*a)^9 + 733728*tan(1/2*a)^10 - 48612*tan(b*x + 4*a)^2*tan(1/2*a)^6 + 259128*tan(b*x +
4*a)*tan(1/2*a)^7 - 274545*tan(1/2*a)^8 + 4230*tan(b*x + 4*a)^2*tan(1/2*a)^4 - 31704*tan(b*x + 4*a)*tan(1/2*a)
^5 + 51632*tan(1/2*a)^6 - 180*tan(b*x + 4*a)^2*tan(1/2*a)^2 + 1592*tan(b*x + 4*a)*tan(1/2*a)^3 - 3846*tan(1/2*
a)^4 + 3*tan(b*x + 4*a)^2 - 24*tan(b*x + 4*a)*tan(1/2*a) + 48*tan(1/2*a)^2 + 1)/((tan(1/2*a)^12 - 30*tan(1/2*a
)^10 + 255*tan(1/2*a)^8 - 452*tan(1/2*a)^6 + 255*tan(1/2*a)^4 - 30*tan(1/2*a)^2 + 1)*(tan(b*x + 4*a)*tan(1/2*a
)^6 - 15*tan(b*x + 4*a)*tan(1/2*a)^4 + 6*tan(1/2*a)^5 + 15*tan(b*x + 4*a)*tan(1/2*a)^2 - 20*tan(1/2*a)^3 - tan
(b*x + 4*a) + 6*tan(1/2*a))^2) - 2*log(abs(tan(b*x + 4*a)*tan(1/2*a)^6 - 15*tan(b*x + 4*a)*tan(1/2*a)^4 + 6*ta
n(1/2*a)^5 + 15*tan(b*x + 4*a)*tan(1/2*a)^2 - 20*tan(1/2*a)^3 - tan(b*x + 4*a) + 6*tan(1/2*a))) + 2*log(abs(6*
tan(b*x + 4*a)*tan(1/2*a)^5 - tan(1/2*a)^6 - 20*tan(b*x + 4*a)*tan(1/2*a)^3 + 15*tan(1/2*a)^4 + 6*tan(b*x + 4*
a)*tan(1/2*a) - 15*tan(1/2*a)^2 + 1)))/b

________________________________________________________________________________________

maple [A]  time = 0.73, size = 27, normalized size = 0.90 \[ -\frac {1}{4 b \sin \left (b x +a \right )^{2}}+\frac {\ln \left (\tan \left (b x +a \right )\right )}{2 b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(b*x+a)^2*csc(2*b*x+2*a),x)

[Out]

-1/4/b/sin(b*x+a)^2+1/2*ln(tan(b*x+a))/b

________________________________________________________________________________________

maxima [B]  time = 0.37, size = 656, normalized size = 21.87 \[ \frac {4 \, \cos \left (4 \, b x + 4 \, a\right ) \cos \left (2 \, b x + 2 \, a\right ) - 8 \, \cos \left (2 \, b x + 2 \, a\right )^{2} + {\left (2 \, {\left (2 \, \cos \left (2 \, b x + 2 \, a\right ) - 1\right )} \cos \left (4 \, b x + 4 \, a\right ) - \cos \left (4 \, b x + 4 \, a\right )^{2} - 4 \, \cos \left (2 \, b x + 2 \, a\right )^{2} - \sin \left (4 \, b x + 4 \, a\right )^{2} + 4 \, \sin \left (4 \, b x + 4 \, a\right ) \sin \left (2 \, b x + 2 \, a\right ) - 4 \, \sin \left (2 \, b x + 2 \, a\right )^{2} + 4 \, \cos \left (2 \, b x + 2 \, a\right ) - 1\right )} \log \left (\cos \left (2 \, b x\right )^{2} + 2 \, \cos \left (2 \, b x\right ) \cos \left (2 \, a\right ) + \cos \left (2 \, a\right )^{2} + \sin \left (2 \, b x\right )^{2} - 2 \, \sin \left (2 \, b x\right ) \sin \left (2 \, a\right ) + \sin \left (2 \, a\right )^{2}\right ) - {\left (2 \, {\left (2 \, \cos \left (2 \, b x + 2 \, a\right ) - 1\right )} \cos \left (4 \, b x + 4 \, a\right ) - \cos \left (4 \, b x + 4 \, a\right )^{2} - 4 \, \cos \left (2 \, b x + 2 \, a\right )^{2} - \sin \left (4 \, b x + 4 \, a\right )^{2} + 4 \, \sin \left (4 \, b x + 4 \, a\right ) \sin \left (2 \, b x + 2 \, a\right ) - 4 \, \sin \left (2 \, b x + 2 \, a\right )^{2} + 4 \, \cos \left (2 \, b x + 2 \, a\right ) - 1\right )} \log \left (\cos \left (b x\right )^{2} + 2 \, \cos \left (b x\right ) \cos \relax (a) + \cos \relax (a)^{2} + \sin \left (b x\right )^{2} - 2 \, \sin \left (b x\right ) \sin \relax (a) + \sin \relax (a)^{2}\right ) - {\left (2 \, {\left (2 \, \cos \left (2 \, b x + 2 \, a\right ) - 1\right )} \cos \left (4 \, b x + 4 \, a\right ) - \cos \left (4 \, b x + 4 \, a\right )^{2} - 4 \, \cos \left (2 \, b x + 2 \, a\right )^{2} - \sin \left (4 \, b x + 4 \, a\right )^{2} + 4 \, \sin \left (4 \, b x + 4 \, a\right ) \sin \left (2 \, b x + 2 \, a\right ) - 4 \, \sin \left (2 \, b x + 2 \, a\right )^{2} + 4 \, \cos \left (2 \, b x + 2 \, a\right ) - 1\right )} \log \left (\cos \left (b x\right )^{2} - 2 \, \cos \left (b x\right ) \cos \relax (a) + \cos \relax (a)^{2} + \sin \left (b x\right )^{2} + 2 \, \sin \left (b x\right ) \sin \relax (a) + \sin \relax (a)^{2}\right ) + 4 \, \sin \left (4 \, b x + 4 \, a\right ) \sin \left (2 \, b x + 2 \, a\right ) - 8 \, \sin \left (2 \, b x + 2 \, a\right )^{2} + 4 \, \cos \left (2 \, b x + 2 \, a\right )}{4 \, {\left (b \cos \left (4 \, b x + 4 \, a\right )^{2} + 4 \, b \cos \left (2 \, b x + 2 \, a\right )^{2} + b \sin \left (4 \, b x + 4 \, a\right )^{2} - 4 \, b \sin \left (4 \, b x + 4 \, a\right ) \sin \left (2 \, b x + 2 \, a\right ) + 4 \, b \sin \left (2 \, b x + 2 \, a\right )^{2} - 2 \, {\left (2 \, b \cos \left (2 \, b x + 2 \, a\right ) - b\right )} \cos \left (4 \, b x + 4 \, a\right ) - 4 \, b \cos \left (2 \, b x + 2 \, a\right ) + b\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(b*x+a)^2*csc(2*b*x+2*a),x, algorithm="maxima")

[Out]

1/4*(4*cos(4*b*x + 4*a)*cos(2*b*x + 2*a) - 8*cos(2*b*x + 2*a)^2 + (2*(2*cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a)
 - cos(4*b*x + 4*a)^2 - 4*cos(2*b*x + 2*a)^2 - sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - 4*si
n(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a) - 1)*log(cos(2*b*x)^2 + 2*cos(2*b*x)*cos(2*a) + cos(2*a)^2 + sin(2*b*x)^
2 - 2*sin(2*b*x)*sin(2*a) + sin(2*a)^2) - (2*(2*cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a) - cos(4*b*x + 4*a)^2 -
4*cos(2*b*x + 2*a)^2 - sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - 4*sin(2*b*x + 2*a)^2 + 4*cos
(2*b*x + 2*a) - 1)*log(cos(b*x)^2 + 2*cos(b*x)*cos(a) + cos(a)^2 + sin(b*x)^2 - 2*sin(b*x)*sin(a) + sin(a)^2)
- (2*(2*cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a) - cos(4*b*x + 4*a)^2 - 4*cos(2*b*x + 2*a)^2 - sin(4*b*x + 4*a)^
2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - 4*sin(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a) - 1)*log(cos(b*x)^2 - 2*co
s(b*x)*cos(a) + cos(a)^2 + sin(b*x)^2 + 2*sin(b*x)*sin(a) + sin(a)^2) + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) -
8*sin(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a))/(b*cos(4*b*x + 4*a)^2 + 4*b*cos(2*b*x + 2*a)^2 + b*sin(4*b*x + 4*a)
^2 - 4*b*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) + 4*b*sin(2*b*x + 2*a)^2 - 2*(2*b*cos(2*b*x + 2*a) - b)*cos(4*b*x +
 4*a) - 4*b*cos(2*b*x + 2*a) + b)

________________________________________________________________________________________

mupad [B]  time = 0.14, size = 36, normalized size = 1.20 \[ -\frac {\frac {\ln \left (\cos \left (a+b\,x\right )\right )}{2}-\frac {\ln \left ({\sin \left (a+b\,x\right )}^2\right )}{4}+\frac {1}{4\,{\sin \left (a+b\,x\right )}^2}}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(a + b*x)^2*sin(2*a + 2*b*x)),x)

[Out]

-(log(cos(a + b*x))/2 - log(sin(a + b*x)^2)/4 + 1/(4*sin(a + b*x)^2))/b

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \csc ^{2}{\left (a + b x \right )} \csc {\left (2 a + 2 b x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(b*x+a)**2*csc(2*b*x+2*a),x)

[Out]

Integral(csc(a + b*x)**2*csc(2*a + 2*b*x), x)

________________________________________________________________________________________